3.558 \(\int \frac{x^{-1+\frac{n}{2}}}{a+b x^n+c x^{2 n}} \, dx\)

Optimal. Leaf size=169 \[ \frac{2 \sqrt{2} \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x^{n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{n \sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{2 \sqrt{2} \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x^{n/2}}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{n \sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b}} \]

[Out]

(2*Sqrt[2]*Sqrt[c]*ArcTan[(Sqrt[2]*Sqrt[c]*x^(n/2))/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[b -
Sqrt[b^2 - 4*a*c]]*n) - (2*Sqrt[2]*Sqrt[c]*ArcTan[(Sqrt[2]*Sqrt[c]*x^(n/2))/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqr
t[b^2 - 4*a*c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]*n)

________________________________________________________________________________________

Rubi [A]  time = 0.191817, antiderivative size = 169, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115, Rules used = {1381, 1093, 205} \[ \frac{2 \sqrt{2} \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x^{n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{n \sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{2 \sqrt{2} \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x^{n/2}}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{n \sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b}} \]

Antiderivative was successfully verified.

[In]

Int[x^(-1 + n/2)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(2*Sqrt[2]*Sqrt[c]*ArcTan[(Sqrt[2]*Sqrt[c]*x^(n/2))/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[b -
Sqrt[b^2 - 4*a*c]]*n) - (2*Sqrt[2]*Sqrt[c]*ArcTan[(Sqrt[2]*Sqrt[c]*x^(n/2))/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqr
t[b^2 - 4*a*c]*Sqrt[b + Sqrt[b^2 - 4*a*c]]*n)

Rule 1381

Int[(x_)^(m_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/(m + 1), Subst[Int[(a +
b*x^Simplify[n/(m + 1)] + c*x^Simplify[(2*n)/(m + 1)])^p, x], x, x^(m + 1)], x] /; FreeQ[{a, b, c, m, n, p}, x
] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IntegerQ[Simplify[n/(m + 1)]] &&  !IntegerQ[n]

Rule 1093

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{x^{-1+\frac{n}{2}}}{a+b x^n+c x^{2 n}} \, dx &=\frac{2 \operatorname{Subst}\left (\int \frac{1}{a+b x^2+c x^4} \, dx,x,x^{n/2}\right )}{n}\\ &=\frac{(2 c) \operatorname{Subst}\left (\int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx,x,x^{n/2}\right )}{\sqrt{b^2-4 a c} n}-\frac{(2 c) \operatorname{Subst}\left (\int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx,x,x^{n/2}\right )}{\sqrt{b^2-4 a c} n}\\ &=\frac{2 \sqrt{2} \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x^{n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}} n}-\frac{2 \sqrt{2} \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x^{n/2}}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{\sqrt{b^2-4 a c} \sqrt{b+\sqrt{b^2-4 a c}} n}\\ \end{align*}

Mathematica [A]  time = 0.279386, size = 145, normalized size = 0.86 \[ \frac{2 \sqrt{2} \sqrt{c} \left (\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x^{n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{\sqrt{b-\sqrt{b^2-4 a c}}}-\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x^{n/2}}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{n \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Integrate[x^(-1 + n/2)/(a + b*x^n + c*x^(2*n)),x]

[Out]

(2*Sqrt[2]*Sqrt[c]*(ArcTan[(Sqrt[2]*Sqrt[c]*x^(n/2))/Sqrt[b - Sqrt[b^2 - 4*a*c]]]/Sqrt[b - Sqrt[b^2 - 4*a*c]]
- ArcTan[(Sqrt[2]*Sqrt[c]*x^(n/2))/Sqrt[b + Sqrt[b^2 - 4*a*c]]]/Sqrt[b + Sqrt[b^2 - 4*a*c]]))/(Sqrt[b^2 - 4*a*
c]*n)

________________________________________________________________________________________

Maple [C]  time = 0.113, size = 114, normalized size = 0.7 \begin{align*} \sum _{{\it \_R}={\it RootOf} \left ( \left ( 16\,{a}^{3}{c}^{2}{n}^{4}-8\,{a}^{2}{b}^{2}c{n}^{4}+a{b}^{4}{n}^{4} \right ){{\it \_Z}}^{4}+ \left ( -4\,abc{n}^{2}+{b}^{3}{n}^{2} \right ){{\it \_Z}}^{2}+c \right ) }{\it \_R}\,\ln \left ({x}^{{\frac{n}{2}}}+ \left ( 4\,{n}^{3}b{a}^{2}-{\frac{{n}^{3}{b}^{3}a}{c}} \right ){{\it \_R}}^{3}+ \left ( 2\,an-{\frac{{b}^{2}n}{c}} \right ){\it \_R} \right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+1/2*n)/(a+b*x^n+c*x^(2*n)),x)

[Out]

sum(_R*ln(x^(1/2*n)+(4*n^3*b*a^2-1/c*n^3*b^3*a)*_R^3+(2*a*n-1/c*n*b^2)*_R),_R=RootOf((16*a^3*c^2*n^4-8*a^2*b^2
*c*n^4+a*b^4*n^4)*_Z^4+(-4*a*b*c*n^2+b^3*n^2)*_Z^2+c))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{\frac{1}{2} \, n - 1}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+1/2*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="maxima")

[Out]

integrate(x^(1/2*n - 1)/(c*x^(2*n) + b*x^n + a), x)

________________________________________________________________________________________

Fricas [B]  time = 1.79865, size = 1705, normalized size = 10.09 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+1/2*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="fricas")

[Out]

1/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*
a^2*b*c)*n^3*sqrt(1/((a^2*b^2 - 4*a^3*c)*n^4)) + (b^2 - 4*a*c)*n)*sqrt(((a*b^2 - 4*a^2*c)*n^2*sqrt(1/((a^2*b^2
 - 4*a^3*c)*n^4)) - b)/((a*b^2 - 4*a^2*c)*n^2)))/x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+1/2*n)/(a+b*x**n+c*x**(2*n)),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{\frac{1}{2} \, n - 1}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+1/2*n)/(a+b*x^n+c*x^(2*n)),x, algorithm="giac")

[Out]

integrate(x^(1/2*n - 1)/(c*x^(2*n) + b*x^n + a), x)